package com.topisv.tms.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "wa_sku_over_info")
public class SkuOverInfo extends IdEntity{
	
	private static final long serialVersionUID = 1L;
	private String warehouseCode ;
	private String customerCode;
	private String sku;
	private Date opeTime;//入库时间
	private Date startTime;//开始超期时间
	private Date endTime;//结束超期时间
	private int overNum;
	private int overDay;
	private boolean endFlag;//是否已经终止叠加超期天数
	
	public String getWarehouseCode() {
		return warehouseCode;
	}
	public void setWarehouseCode(String warehouseCode) {
		this.warehouseCode = warehouseCode;
	}
	public String getCustomerCode() {
		return customerCode;
	}
	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}
	public String getSku() {
		return sku;
	}
	public void setSku(String sku) {
		this.sku = sku;
	}
	public int getOverNum() {
		return overNum;
	}
	public void setOverNum(int overNum) {
		this.overNum = overNum;
	}
	public int getOverDay() {
		return this.overDay;
	}
	public void setOverDay(int overDay) {
		this.overDay = overDay;
	}
	public Date getOpeTime() {
		return opeTime;
	}
	public void setOpeTime(Date opeTime) {
		this.opeTime = opeTime;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public boolean getEndFlag() {
		return endFlag;
	}
	public void setEndFlag(boolean endFlag) {
		this.endFlag = endFlag;
	}
	@Transient
	public String getOpeTimeStr(){
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		return this.opeTime==null?"":format.format(this.opeTime);
	}
	@Transient
	public String getStartTimeStr(){
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		return this.startTime==null?"":format.format(this.startTime);
	}
	@Transient
	public String getEndTimeStr(){
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		return this.endTime==null?"":format.format(this.endTime);
	}
}
